<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Dockerfile Generator, see http://github.com/yeasy/dockerfileGen">
    <meta name="author" content="yeasy@github.com">

    <title>Dockerfile Generator</title>

    <!-- Bootstrap Core CSS -->
    <link href="./bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">


    <!-- Custom Fonts -->
    <link href="./bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <script type="text/javascript">
        function do_submit() {
            var baseimage = document.getElementById("baseimage").value;
            var maintainer = document.getElementById("maintainer").value;
            var cmd = document.getElementById("cmd").value;
            var expose = document.getElementById("expose").value;
            var result = "# Dockerfile generated\n#\n# VERSION 0.1\n\n"
                    + "FROM: " + baseimage + "\n"
                    + "MAINTAINER:" + maintainer + "\n"
                    + "EXPOSE:" + expose + "\n"
                    + "CMD: " + cmd;
            document.getElementById("result").value = result
        }
    </script>

</head>

<body ng-app="Dockerfilegen">
<div ng-controller="mainCtrl">
    <div class="row">
        <nav class="navbar navbar-inverse">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
                            aria-expanded="false" aria-controls="navbar">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="#">@</a>
                </div>
                <div id="navbar" class="collapse navbar-collapse">
                    <ul class="nav navbar-nav">
                        <li class="active"><a href="#">Generator</a></li>
                        <li><a target="_blank" href="https://github.com/yeasy/dockerfileGen">About</a></li>
                    </ul>
                </div>
                <!--/.nav-collapse -->
            </div>
        </nav>
    </div>

    <div class="container">
        <form class="form-horizontal">
            <div class="form-group">
                <label class="control-label col-sm-2">Base Image: </label>

                <div class="col-sm-10">
                    <input type="text" class="form-control" ng-model="dockerparam.baseimage" required autofocus/><br>
                </div>

                <label class="control-label col-sm-2">Maintainer: </label>

                <div class="col-sm-10">
                    <input type="text" ng-model="dockerparam.maintainer" class="form-control" value="maintainer"/><br>
                </div>

                <label class="control-label col-sm-2">Boot command: </label>

                <div class="col-sm-10">
                    <input type="text" ng-model="dockerparam.cmd" class="form-control"
                           value="container booting cmd"/><br>
                </div>

                <label class="control-label col-sm-2">Expose Port: </label>

                <div class="col-sm-10">
                    <input type="text" ng-model="dockerparam.expose" class="form-control" placeholder="80"/><br>
                </div>

                <label class="control-label col-sm-2">RUN: </label>

                <div class="col-sm-10">
                    <input type="text" ng-model="dockerparam.run" class="form-control" placeholder="run"/><br>
                </div>

                <label class="control-label col-sm-2">ENV: </label>

                <div class="col-sm-10">
                    <input type="text" ng-model="dockerparam.env" class="form-control"
                           placeholder="DEBIAN_FRONTEND noninteractive"/><br>
                </div>
                <div class="col-sm-offset-2">
                    <button class="btn-primary " ng-click="gen(dockerparam)">
                        <lable>gen</lable>
                    </button>
                    <button class="btn-primary " ng-click="reset()">
                        <lable>reset</lable>
                    </button>
                </div>
            </div>
        </form>
    </div>

    <div class="container">
        <div class="col-md-offset-2 col-md-10">
            <div class="form-horizontal">
                <div class="form-group">
                    <label>Generated results: </label>
                <textarea class="form-control" rows="16" cols="80" ng-model="result"
                        ></textarea>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- jQuery -->
<script src="./bower_components/jquery/dist/jquery.min.js"></script>

<!-- Bootstrap Core JavaScript -->
<script src="./bower_components/bootstrap/dist/js/bootstrap.min.js"></script>


<!--add by waitfish-->


<!--start bower-->
<script src="./bower_components/angular/angular.js"></script>
<script src="./bower_components/lodash/lodash.js"></script>
<script src="./bower_components/restangular/dist/restangular.js"></script>
<script src="./bower_components/ui-router/release/angular-ui-router.js"></script>
<!--end bower-->


<!--start app-->
<script src="./app.js"></script>


<!--start service-->

<!--stop service-->

<!--start controller-->

<!--end controller-->

<!--start directives-->

<!--stop directives-->
<!--end app-->
</body>

</html>
